package com.example.finalapp;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;

import com.example.bills.BillsActivity;
import com.example.shopping.ShoppingListActivity;

public class SplitActionBarActivity extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_split_action_bar);
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		MenuInflater menuInflater = getMenuInflater();
        menuInflater.inflate(R.menu.split_action_bar, menu);
        return true;
	}

	@Override
	public boolean onOptionsItemSelected(MenuItem item) {
		switch(item.getItemId()){
		case R.id.bills:
		{
			Intent intent = new Intent(SplitActionBarActivity.this, BillsActivity.class);
			startActivity(intent);
		}
		case R.id.shopping:
		{
			Intent intent = new Intent(SplitActionBarActivity.this, ShoppingListActivity.class);
			startActivity(intent);
//			Intent intent = new Intent(SplitActionBarActivity.this, StickyNoteActivity.class);
//			startActivity(intent);
		}

		case R.id.budget:
		{
			Intent intent = new Intent(SplitActionBarActivity.this, BudgetManagerActivity.class);
			startActivity(intent);
		}

		
		}
		return super.onOptionsItemSelected(item);
	}

	
	

}


